<include file="Public/header" />
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>{$title}</h3>
    </div>
  </div>
  <div class="fixed-empty"></div>
    <table class="table tb-type2 nobdb">
      <tbody>
        <tr class="noborder">
          <td colspan="2" class="required">姓名:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['name']}" name="name" id="name" class="txt"></td>
          <td class="vatop tips"></td>
        </tr>        
        <tr class="noborder">
          <td colspan="2" class="required">手机号:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['mobile']}" name="mobile" id="mobile" class="txt"></td>
          <td class="vatop tips"></td>
        </tr>      
        <tr class="noborder">
          <td colspan="2" class="required">邮箱:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['email']}" name="email" id="email" class="txt"></td>
          <td class="vatop tips"></td>
        </tr> 
        <tr class="noborder">
          <td colspan="2" class="required">目的地:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['destination']}" name="destination" id="destination" class="txt"></td>
          <td class="vatop tips"></td>
        </tr> 
        <tr class="noborder">
          <td colspan="2" class="required">预算:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['budget']}" name="budget" id="budget" class="txt"></td>
          <td class="vatop tips"></td>
        </tr> 
        <tr class="noborder">
          <td colspan="2" class="required">出发日期:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['departure_date']}" name="departure_date" id="departure_date" class="txt"></td>
          <td class="vatop tips"></td>
        </tr> 
        <tr class="noborder">
          <td colspan="2" class="required">行程天数:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['days_num']}" name="days_num" id="days_num" class="txt"></td>
          <td class="vatop tips"></td>
        </tr> 
        <tr class="noborder">
          <td colspan="2" class="required">成人人数:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['adult_num']}" name="adult_num" id="adult_num" class="txt"></td>
          <td class="vatop tips"></td>
        </tr> 
        <tr class="noborder">
          <td colspan="2" class="required">小孩人数:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['child_num']}" name="child_num" id="child_num" class="txt"></td>
          <td class="vatop tips"></td>
        </tr>
        <tr class="noborder">
          <td colspan="2" class="required">婴儿人数:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['baby_num']}" name="baby_num" id="baby_num" class="txt"></td>
          <td class="vatop tips"></td>
        </tr>
        <tr class="noborder">
          <td colspan="2" class="required">护照签发地:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['passport_issue']}" name="passport_issue" id="passport_issue" class="txt"></td>
          <td class="vatop tips"></td>
        </tr>
        <tr class="noborder">
          <td colspan="2" class="required">交通方式:</td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="{$info['traffic']}" name="traffic" id="traffic" class="txt"></td>
          <td class="vatop tips"></td>
        </tr>
        
        <tr>
          <td colspan="2" class="required"><label class="validation">其他需求:</label></td>
        </tr>
        <tr class="noborder">
          <td colspan="2" class="vatop rowform">
          <?php kindEditor('content',$info['content']);?>
          </td>
        </tr>
                
      </tbody>
      <if condition="$auth eq 1">
      <tfoot>
        <tr class="tfoot">
          <td colspan="1" ><a href="JavaScript:void(0);" class="btn"><span>提交处理</span></a></td>
        </tr>
      </tfoot>
	  </if>
    </table>
</div>
<script>
//按钮先执行验证再提交表单
$(function(){$("#submitBtn").click(function(){
    if($("#article_form").valid()){
     $("#article_form").submit();
	 }
	});
});
//
$(document).ready(function(){
	$('#article_form').validate({
        errorPlacement: function(error, element){
			error.appendTo(element.parent().parent().prev().find('td:first'));
        },
        success: function(label){
            label.addClass('valid');
        },
        rules : {
            article_title : {
                required   : true
            },
			ac_id : {
                required   : true
            },
			article_url : {
				url : true
            },
			article_content : {
                required   : true
            },
            article_sort : {
                number   : true
            }
        },
        messages : {
            article_title : {
                required   : '请输入标题'
            },
			ac_id : {
                required   : '请选择分类'
            },
			article_url : {
				url : '输入错误'
            },
			article_content : {
                required   : '请输入内容'
            },
            article_sort  : {
                number   : '输入错误'
            }
        }
    });
});
</script>
<script type="text/javascript" src="__STATIC__/jquery-ui/jquery.ui.js"></script> 
<script type="text/javascript" src="__STATIC__/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="__STATIC__/jquery-ui/themes/ui-lightness/jquery.ui.css"  />
<include file="Public/footer" />